<!--#
layout("/layouts/platform.html"){
#-->
<div id="app"  v-cloak>
    <div class="head">
        <div class="headone">
            <el-tooltip class="item" effect="dark" content="返回">
                <el-button @click="window.location.href='/platform/bus/ypxx/jbxx'"  icon="el-icon-back" size="mini" circle></el-button>
            </el-tooltip>
            <span >样品修改</span>
        </div>
    </div>
    <div style="margin-left: 20px;margin-top: 5px;">
        <el-form :model="formData" ref="addForm" :rules="Rules" size="mini" label-width="150px" >
            <el-collapse v-model="activeNames" >
                <el-collapse-item title="样品信息" name="1">
                    <el-row :gutter="20" border>
                        <el-col :span="8">
                            <el-form-item prop="jyksbh" label="检验部门"><!--:props="props"-->
                                <el-cascader v-model="formData.jyksbh" :options="allMap.unitOptions" ref="jyksCascader" collapse-tags style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="zh" label="项目类别">
                                <el-cascader v-model="formData.zh" :options="allMap.zhOptions" @change="findZh" style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="ypbh" label="样品编号">
                                <el-input maxlength="30"  v-trim v-model="formData.ypbh"  style="width:180px;" ></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jylx" label="检验类别">
                                <el-cascader v-model="formData.jylx" :options="allMap.jylxOptions" style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="ypmc" label="产品名称">
                                <el-input maxlength="30"  v-trim v-model="formData.ypmc" style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="yplx" label="产品类型">
                                <el-cascader v-model="formData.yplx" :options="allMap.yplxOptions" style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="bysl" label="备样数量">
                                <el-input-number maxlength="30"  v-trim v-model="formData.bysl"  style="width:110px;"></el-input-number>
                                <el-tooltip class="item" effect="dark" content="若没有单位直接留空，不要填斜杠/">
                                    <el-input maxlength="30" placeholder="单位"  v-trim v-model="formData.unit"  style="width:70px;"></el-input>
                                </el-tooltip>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jysl" label="检样数量">
                                <el-input-number maxlength="30"  v-trim v-model="formData.jysl"  style="width:110px;"></el-input-number>
                                <el-tooltip class="item" effect="dark" content="若没有单位直接留空，不要填斜杠/">
                                    <el-input maxlength="30" placeholder="单位"  v-trim v-model="formData.unit"  style="width:70px;"></el-input>
                                </el-tooltip>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="ypdj" label="样品等级">
                                <el-input maxlength="30"  v-trim v-model="formData.ypdj"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="ypzt" label="样品特性/状态">
                                <el-input maxlength="30"  v-trim v-model="formData.ypzt" style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="szcs" label="所在城市">
                                <el-cascader v-model="formData.szcs" :props="addressProps" :options="allMap.szcsOptions" style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="scrqpc" label="原编号/生产日期">
                                <el-input maxlength="60"  v-trim v-model="formData.scrqpc"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="ggxh" label="规格型号">
                                <el-input maxlength="30"  v-trim v-model="formData.ggxh"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="cyry" label="企业联系人">
                                <el-input maxlength="30"  v-trim v-model="formData.cyry"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jyfdb" label="企业联系人电话">
                                <el-input maxlength="30"  v-trim v-model="formData.jyfdb"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="sb" label="商标">
                                <el-input maxlength="30"  v-trim v-model="formData.sb"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20" v-if="formData.jylx=='jdcc'">
                        <el-col :span="8">
                            <el-form-item prop="cydw" label="抽样单位">
                                <el-autocomplete
                                        v-trim v-model="formData.cydw"
                                        :fetch-suggestions="companySearch"
                                        value-key="name"
                                        clearable
                                        class="inline-input w-50"
                                        placeholder="请输入关键字查找"
                                        @select="cydwSelect"
                                        style="width:180px;"
                                />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="cyryBy" label="抽样人员">
                                <el-input maxlength="30"  v-trim v-model="formData.cyryBy"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="cyrq" label="抽样日期">
                                <el-date-picker type="date"  v-trim v-model="formData.cyrq" value-format="yyyy-MM-dd" style="width: 180px;"></el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="cydbh" label="抽样单编号">
                                <el-input maxlength="30"  v-trim v-model="formData.cydbh"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="cyjs" label="抽样基数">
                                <el-input maxlength="30"  v-trim v-model="formData.cyjs"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="cydd" label="抽样地点">
                                <el-input maxlength="30"  v-trim v-model="formData.cydd"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-collapse-item>
                <el-collapse-item title="厂家信息" name="2">
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="wtdw" label="委托单位">
                                <el-autocomplete
                                        v-trim v-model="formData.wtdw"
                                        :fetch-suggestions="companySearch"
                                        value-key="name"
                                        clearable
                                        class="inline-input w-50"
                                        placeholder="请输入关键字查找"
                                        @select="wtdwSelect"
                                        style="width:180px;"
                                />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="wtdwdz" label="委托单位地址">
                                <el-input maxlength="75"  v-trim v-model="formData.wtdwdz"   style="width:250px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="wtdwlxr" label="委托单位法人">
                                <el-input maxlength="16"  v-trim v-model="formData.wtdwlxr"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="wtdwsj" label="委托单位信用代码">
                                <el-input maxlength="25"  v-trim v-model="formData.wtdwsj"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="wtdwdh" label="委托单位电话">
                                <el-input maxlength="16"  v-trim v-model="formData.wtdwdh"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="wtdwyb" label="委托单位邮编">
                                <el-input maxlength="16"  v-trim v-model="formData.wtdwyb"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="sjdw" label="受检单位">
                                <el-autocomplete
                                        v-trim v-model="formData.sjdw"
                                        :fetch-suggestions="companySearch"
                                        value-key="name"
                                        clearable
                                        class="inline-input w-50"
                                        placeholder="请输入关键字查找"
                                        @select="sjdwSelect"
                                        style="width:180px;"
                                />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="sjdwdz" label="受检单位地址">
                                <el-input maxlength="75"  v-trim v-model="formData.sjdwdz"  style="width:250px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="sjdwlxr" label="受检单位法人">
                                <el-input maxlength="16"  v-trim v-model="formData.sjdwlxr"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="sjdwsj" label="受检单位信用代码">
                                <el-input maxlength="25"  v-trim v-model="formData.sjdwsj"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="sjdwdh" label="受检单位电话">
                                <el-input maxlength="16"  v-trim v-model="formData.sjdwdh"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="sjdwyb" label="受检单位邮编">
                                <el-input maxlength="16"  v-trim v-model="formData.sjdwyb"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="scdw" label="生产单位">
                                <el-autocomplete
                                        v-trim v-model="formData.scdw"
                                        :fetch-suggestions="companySearch"
                                        value-key="name"
                                        clearable
                                        class="inline-input w-50"
                                        placeholder="请输入关键字查找"
                                        @select="scdwSelect"
                                        style="width:180px;"
                                />
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="scdwdz" label="生产单位地址">
                                <el-input maxlength="75"  v-trim v-model="formData.scdwdz"  style="width:250px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="scdwlxr" label="生产单位法人">
                                <el-input maxlength="16"  v-trim v-model="formData.scdwlxr"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="scdwsj" label="生产单位信用代码">
                                <el-input maxlength="25"  v-trim v-model="formData.scdwsj"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="scdwdh" label="生产单位电话">
                                <el-input maxlength="16"  v-trim v-model="formData.scdwdh"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="scdwyb" label="生产单位邮编">
                                <el-input maxlength="16"  v-trim v-model="formData.scdwyb"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>

                    <el-row :gutter="20">
                        <el-col :span="24">
                            <div style="text-align: center;width: 100%">
                                <el-button size="mini" @click="sjdwToWtdw" plain>受检单位同委托单位</el-button>
                                <el-button size="mini" @click="scdwToSjdw" plain>生产单位同受检单位</el-button>
                            </div>
                        </el-col>
                    </el-row>
                </el-collapse-item>
                <el-collapse-item title="检验信息" name="3">
                    <el-row :gutter="20">
                        <el-col :span="16">
                            <el-form-item prop="jyxm" label="检验项目">
                                <el-input maxlength="200" readonly v-model="formData.jyxm" type="textarea" size="mini" rows="3"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8" style="">
                            <el-button type="primary" size="mini" @click="openIns" plain>选择检验项目</el-button>
                        </el-col>
                    </el-row>
                    <el-row :gutter="20">
                        <el-col :span="24">
                            <el-form-item prop="jyyj" label="检验依据">
                                <el-input maxlength="200" v-model="formData.jyyj" type="textarea" size="mini" rows="3"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jyfy" label="检验费用（元）">
                                <el-input-number maxlength="30"  v-trim v-model="formData.jyfy"  style="width:180px;"></el-input-number>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jyfydd" label="检验费用待定">
                                <el-radio-group v-model="formData.jyfydd">
                                    <el-radio label="0">待定</el-radio>
                                    <el-radio label="1">不待定</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="yhxtk" label="样品处置">
                                <el-cascader v-model="formData.yhxtk" :options="allMap.ypczOptions" style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jyhth" label="检验合同号">
                                <el-input maxlength="30"  v-trim v-model="formData.jyhth"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="jcfyry" label="检查封样人员">
                                <el-input maxlength="30"  v-trim v-model="formData.jcfyry"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="bgfsfs" label="报告领取">
                                <el-radio-group v-model="formData.bgfsfs">
                                    <el-radio label="0">邮寄</el-radio>
                                    <el-radio label="1">自取</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="dyrq" label="到样日期">
                                <el-date-picker type="date"  v-trim v-model="formData.dyrq" value-format="yyyy-MM-dd" style="width: 180px;"></el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="wcqx" label="完成期限">
                                <el-date-picker type="date"  v-trim v-model="formData.wcqx" value-format="yyyy-MM-dd" style="width: 180px;"></el-date-picker>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="limitDay" label="检验时限">
                                <el-input-number maxlength="30"  v-trim v-model="formData.limitDay"  style="width:180px;"></el-input-number> 个工作日
                            </el-form-item>
                        </el-col>
                        <el-col :span="24">
                            <el-tooltip class="item" effect="dark" content="此项解释：委托单中的检验要求，生成报告中的备注">
                                <el-form-item prop="bz" label="报告备注（检验要求）">
                                    <el-input maxlength="200"  v-trim v-model="formData.bz" type="textarea" size="mini" rows="3"></el-input>
                                </el-form-item>
                            </el-tooltip>
                        </el-col>
                        <el-col :span="24">
                            <el-tooltip class="item" effect="dark" content="此项解释：只系统中使用">
                            <el-form-item prop="tssm" label="其它说明">
                                <el-input maxlength="200"  v-trim v-model="formData.tssm" type="textarea" size="mini" rows="3"></el-input>
                            </el-form-item>
                            </el-tooltip>
                        </el-col>
                    </el-row>
                </el-collapse-item>

                <el-collapse-item title="其他委托信息" name="4">
                    <el-row :gutter="20">
                        <el-col :span="8">
                            <el-form-item prop="validity" label="有效期/保质期">
                                <el-input maxlength="30"  v-trim v-model="formData.validity"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="packing" label="包装">
                                <el-input maxlength="30"  v-trim v-model="formData.packing"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="storage" label="样品贮存">
                                <el-cascader v-model="formData.storage" :options="allMap.storageOptions" collapse-tags style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="information" label="提供的资料">
                                <el-cascader v-model="formData.information" :options="allMap.informationOptions" :props="{ multiple: true}" collapse-tags style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="subcontract" label="分包方名称">
                                <el-input maxlength="30"  v-trim v-model="formData.subcontract"  style="width:180px;"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="intention" label="客户意向">
                                <el-cascader v-model="formData.intention" :options="allMap.intentionOptions" collapse-tags style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item prop="exterior" label="样品外观">
                                <el-cascader v-model="formData.exterior" :options="allMap.exteriorOptions" collapse-tags style="width:180px;"></el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :span="24">
                            <el-form-item prop="xysRemark" label="协议书备注">
                                <el-input maxlength="200"  v-trim v-model="formData.xysRemark" type="textarea" size="mini" rows="3"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-collapse-item>
            </el-collapse>
            <el-row :gutter="20">
                <el-col align="center">
                    <br/>
                    <el-button type="info" @click="window.location.href='/platform/bus/ypxx/jbxx'" plain>返回</el-button>
                    <el-button type="success" @click="doDraft" plain>保存草稿</el-button>
                    <el-button type="primary" @click="doAdd" plain>提交</el-button>
                </el-col>
            </el-row>
        </el-form>

    </div>
    <el-dialog :close-on-click-modal="false" title="选择检验项目" :visible.sync="insVisible" width="60%">
        <el-row class="header navbar bg-white" style="width: 80%">
            <div class="btn-group tool-button" style="line-height: 50px;">
                <el-input placeholder="产品名称" v-trim v-model="pageForm.productName"  size="mini" style="width:120px;"></el-input>
                <el-input placeholder="检验依据标准" v-trim v-model="pageForm.inspectionStandard"  size="mini" style="width:120px;"></el-input>
                <el-input placeholder="项目名称" v-trim v-model="pageForm.inspectionItemName"  size="mini" style="width:120px;"></el-input>
                <el-button slot="append" icon="el-icon-search" size="mini" @click="doSearch" circle></el-button>
            </div>
        </el-row>
        <el-row class="el-table-container">
            <el-table :data="insTableData"  height="300" ref="multipleTable"  border size="small" header-align="center"  style="width: 100%" @select-all="selectAll" @select="select">
                <el-table-column fixed="left" width="35"  type="selection"></el-table-column>
                <el-table-column prop="productName" label="产品名称" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column prop="inspectionStandard" label="检验依据标准" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column prop="inspectionItemName" label="检验项目" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column prop="inspectionItemOrder" label="附页序号" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="inspectionPrice" label="检验费用（元）" min-width="120px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="inspectionCycle" label="检验周期（天）" min-width="120px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="productTypeCode" label="产品类型" min-width="110px;" header-align="center" align="center" show-overflow-tooltip>
                    <template slot-scope="scope">
                        {{getDict(scope.row.productTypeCode,allMap.yplxMap)}}
                    </template>
                </el-table-column>
                <el-table-column   prop="specification" label="规格型号" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="sampleCount" label="样品数量" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="chargeStandardName" label="收费标准" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="countUnit" label="计量单位" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="environmentStandard" label="环境要求" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
                <el-table-column   prop="remark" label="备注" min-width="110px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
            </el-table>
        </el-row>
        <el-row class="el-pagination-container">
            <el-pagination @size-change="pageSizeChange" @current-change="pageNumberChange"
                           :current-page="pageForm.pageNumber" :page-sizes="[10, 20, 30, 50]"
                           :page-size="pageForm.pageSize" layout="total, sizes, prev, pager, next, jumper"
                           :total="pageForm.totalCount">
            </el-pagination>
        </el-row>
        <el-divider></el-divider>
        <el-table :data="multipleSelectionOld"  height="400"  border size="small" header-align="center"  style="width: 100%" >
            <el-table-column  label="操作" width="60" header-align="center" align="center">
                <template slot-scope="scope">
                    <el-button  icon="el-icon-delete" size="mini" @click="deleteSelection(scope.row)" circle></el-button>
                </template>
            </el-table-column>
            <el-table-column prop="productName" label="产品名称"  header-align="center" align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="inspectionStandard" label="检验依据标准" min-width="90px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="inspectionItemName" label="检验项目" min-width="90px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="inspectionItemOrder" label="附页序号" min-width="90px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="frequency" label="检验次数" min-width="90px;" header-align="center" align="center" show-overflow-tooltip>
                <template slot-scope="scope">
                    <el-input v-trim v-model="scope.row.frequency"  @input="scope.row.frequency=scope.row.frequency.replace(/[^\d]/g, '').replace(/^0{1,}/g,'');if(scope.row.frequency=='')scope.row.frequency=1" size="mini" style="width:100%;"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="inspectionPrice" label="原检验费用" min-width="90px;" header-align="center" align="center" show-overflow-tooltip>
            </el-table-column>
            <el-table-column prop="price" label="检验费用（元）" min-width="90px;" header-align="center" align="center" show-overflow-tooltip>
                <template slot-scope="scope">
                    <el-input v-trim v-model="scope.row.price" @input="scope.row.price=scope.row.price.replace(/[^\d^\.]+/g,'');if(scope.row.price=='')scope.row.price=0" size="mini" style="width:100%;"></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="inspectionCycle" label="检验周期（天）" min-width="90px;" header-align="center" align="center" show-overflow-tooltip></el-table-column>
        </el-table>
        <span slot="footer" class="dialog-footer"><el-button @click="insVisible = false">取 消</el-button><el-button type="primary" @click="doIns">确 定</el-button></span>
    </el-dialog>
</div>
<script>
    new Vue({
        el: "#app",
        data: function () {
            var allMap = {yplxOptions:${yplxOptions},unitOptions:${unitOptions},zhOptions:${zhOptions},szcsOptions:${szcsOptions},ypczOptions:${ypczOptions},jylxOptions:${jylxOptions},yplxMap:${yplxMap},storageOptions:${storageOptions},informationOptions:${informationOptions},intentionOptions:${intentionOptions},exteriorOptions:${exteriorOptions}};
            var validate = function (rule, value, callback) {
                if (nONull(value)) {
                    //return callback(new Error('输入不可以为空'));
                    if (!Number(value)) {
                        callback(new Error('请输入数字'));
                    } else {
                        callback();
                    }
                }else{
                    callback();
                }
            };
            return {
                activeNames: ['1','2','3','4'],
                active: 0,
                props: { multiple: true},
                insTableData: [],
                allMap:allMap,
                formData: ${obj},
                Rules:{

                    jyksbh:[{required: true, message: '检验部门不可为空！', trigger: ['blur', 'change']}],
                    zh:[{required: true, message: '项目类别不可为空！', trigger: ['blur', 'change']}],
                    ypbh:[{required: true, message: '样品编号不可为空！', trigger: ['blur', 'change']}],
                    ypmc:[{required: true, message: '产品名称不可为空！', trigger: ['blur', 'change']}],
                    yplx:[{required: true, message: '产品类型不可为空！', trigger: ['blur', 'change']}],
                    ypdj:[{required: true, message: '样品等级不可为空！', trigger: ['blur', 'change']}],
                    ypzt:[{required: true, message: '样品特性/状态不可为空！', trigger: ['blur', 'change']}],
                    bysl:[{required: true, message: '备样数量不可为空！', trigger: ['blur', 'change']}],
                    jysl:[{required: true, message: '检样数量不可为空！', trigger: ['blur', 'change']}],
                    szcs:[{required: true, message: '所在城市不可为空！', trigger: ['blur', 'change']}],
                    scrqpc:[{required: true, message: '原编号/生产日期不可为空！', trigger: ['blur', 'change']}],
                    ggxh:[{required: true, message: '规格型号不可为空！', trigger: ['blur', 'change']}],
                    cyry:[{required: true, message: '企业联系人不可为空！', trigger: ['blur', 'change']}],
                    sb:[{required: true, message: '商标不可为空！', trigger: ['blur', 'change']}],
                    cyrq:[{required: true, message: '抽样日期不可为空！', trigger: ['blur', 'change']}],
                    cydbh:[{required: true, message: '抽样单编号不可为空！', trigger: ['blur', 'change']}],
                    cydw:[{required: true, message: '抽样单位不可为空！', trigger: ['blur', 'change']}],
                    cyjs:[{required: true, message: '抽样基数不可为空！', trigger: ['blur', 'change']}],
                    cydd:[{required: true, message: '抽样地点不可为空！', trigger: ['blur', 'change']}],
                    jyfdb:[{required: true, message: '企业联系方式不可为空！', trigger: ['blur', 'change']},{pattern: /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^\((0[0-9]{2,3})\)-?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^1[3456789]\d{9}$|^\/$/, message: '只能输入手机号码、座机号码或斜杠/'}],
                    jylx:[{required: true, message: '检验类别不可为空！', trigger: ['blur', 'change']}],
                    cyryBy:[{required: true, message: '抽样人员不可为空！', trigger: ['blur', 'change']}],

                    wtdw:[{required: true, message: '委托单位不可为空！', trigger: ['blur', 'change']}],
                    wtdwdz:[{required: true, message: '委托单位地址不可为空！', trigger: ['blur', 'change']}],
                    wtdwlxr:[{required: true, message: '委托单位法人不可为空！', trigger: ['blur', 'change']}],
                    wtdwsj:[{required: true, message: '信用代码不可为空！', trigger: ['blur', 'change']},{pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}\(\w{1}\-\w{1}\)|[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$|^\/$/, message: '输入15或18位号码、英文括号“例(1-1)”或斜杠/'}],
                    wtdwdh:[{required: true, message: '委托单位电话不可为空！', trigger: ['blur', 'change']},{pattern: /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^\((0[0-9]{2,3})\)-?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^1[3456789]\d{9}$|^\/$/, message: '只能输入手机号码、座机号码或斜杠/'}],
                    wtdwyb:[{required: true, message: '委托单位邮编不可为空！', trigger: ['blur', 'change']}, {pattern: /^\d{6}$|^\/$/, message: '邮编只能是6位数字或斜杠/'}],

                    sjdw:[{required: true, message: '受检单位不可为空！', trigger: ['blur', 'change']}],
                    sjdwdz:[{required: true, message: '受检单位地址不可为空！', trigger: ['blur', 'change']}],
                    sjdwlxr:[{required: true, message: '受检单位法人不可为空！', trigger: ['blur', 'change']}],
                    sjdwsj:[ {required: true, message: '信用代码不可为空！', trigger: ['blur', 'change']},{pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}\(\w{1}\-\w{1}\)|[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$|^\/$/, message: '输入15或18位号码、英文括号“例(1-1)”或斜杠/'}],
                    sjdwdh:[{required: true, message: '受检单位电话不可为空！', trigger: ['blur', 'change']},{pattern: /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^\((0[0-9]{2,3})\)-?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^1[3456789]\d{9}$|^\/$/, message: '只能输入手机号码、座机号码或斜杠/'}],
                    sjdwyb:[{required: true, message: '受检单位邮编不可为空！', trigger: ['blur', 'change']}, {pattern: /^\d{6}$|^\/$/, message: '邮编只能是6位数字或斜杠/'}],

                    scdw:[{required: true, message: '生产单位不可为空！', trigger: ['blur', 'change']}],
                    scdwdz:[{required: true, message: '生产单位地址不可为空！', trigger: ['blur', 'change']}],
                    scdwlxr:[{required: true, message: '生产单位法人不可为空！', trigger: ['blur', 'change']}],
                    scdwsj:[ {required: true, message: '信用代码不可为空！', trigger: ['blur', 'change']},{pattern: /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}\(\w{1}\-\w{1}\)|[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$|^\/$/, message: '输入15或18位号码、英文括号“例(1-1)”或斜杠/'}],
                    scdwdh:[{required: true, message: '生产单位电话不可为空！', trigger: ['blur', 'change']},{pattern: /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^\((0[0-9]{2,3})\)-?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|^1[3456789]\d{9}$|^\/$/, message: '只能输入手机号码、座机号码或斜杠/'}],
                    scdwyb:[{required: true, message: '生产单位邮编不可为空！', trigger: ['blur', 'change']}, {pattern: /^\d{6}$|^\/$/, message: '邮编只能是6位数字或斜杠/'}],

                    jyxm:[{required: true, message: '检验项目不可为空！', trigger: ['blur', 'change']}],
                    jyyj:[{required: true, message: '检验依据不可为空！', trigger: ['blur', 'change']}],
                    jyfy:[{required: true, message: '检验费用不可为空！', trigger: ['blur', 'change']},{validator: validate, trigger: ['blur', 'change']}],
                    jyfydd:[{required: true, message: '请选择检验费用待定！', trigger: ['blur', 'change']}],
                    yhxtk:[{required: true, message: '请选择样品处置！', trigger: ['blur', 'change']}],
                    jyhth:[{required: true, message: '检验合同号不可为空！', trigger: ['blur', 'change']}],
                    jcfyry:[{required: true, message: '检查封样人员不可为空！', trigger: ['blur', 'change']}],
                    bgfsfs:[{required: true, message: '请选择报告领取方式！', trigger: ['blur', 'change']}],
                    dyrq:[{required: true, message: '请选择到样日期！', trigger: ['blur', 'change']}],
                    wcqx:[{required: true, message: '请选择完成期限！', trigger: ['blur', 'change']}],
                    limitDay:[{required: true, message: '检验时限不可为空！', trigger: ['blur', 'change']}],
                    bz:[{required: true, message: '报告备注不可为空！', trigger: ['blur', 'change']}],

                },
                pageForm:{pageNumber:1,pageSize:10},
                insVisible:false,
                multipleSelection: [],
                multipleSelectionOld:[],
                addressProps: {
                    lazy: true,
                    lazyLoad (node, resolve) {
                        $.post(base + "/platform/sys/dict/dictTreeChild", {code:node.data.code}, function (data) {
                            if (data.code == 0) {
                                resolve(data.data)
                            } else {
                                self.$message({message: data.msg,type: 'error'});
                            }
                        }, "json");
                    }
                }
            }
        },
        methods: {
            deleteSelection:function(scope){
                var self = this;
                self.multipleSelection.forEach(function(itemNew,i){
                    if (itemNew.insItemId == scope.insItemId) {
                        self.multipleSelection.splice(i,1);
                        self.$refs.multipleTable.toggleRowSelection(itemNew, false)
                    }
                })
                self.multipleSelectionOld.forEach(function(itemOld,i) {
                    if (itemOld.insItemId == scope.insItemId) {
                        self.multipleSelectionOld.splice(i,1);
                    }
                })

            },
            doIns: function () {
                var self = this;
                if (self.multipleSelectionOld.length > 0) {
                    var inspectionItemNames = "";
                    var inspectionStandards = [];
                    var inspectionStandardstr = "";
                    var prices = 0 ;
                    var inspectionCycles = 0;
                    self.multipleSelectionOld.forEach(function (val) {
                        inspectionItemNames += val.inspectionItemName + "，";
                        var a = true;
                        inspectionStandards.forEach(function(ins){
                            if (ins == val.inspectionStandard) {
                                a = false;
                            }
                        })
                        if(a){
                            inspectionStandards.push(val.inspectionStandard);
                            inspectionStandardstr += val.inspectionStandard+"，";
                        }
                        if(nONull(val.price))
                            prices +=parseFloat(val.price);
                        if(nONull(val.inspectionCycle))
                            inspectionCycles+=parseFloat(val.inspectionCycle);
                    });
                    inspectionItemNames = inspectionItemNames.substring(0,(inspectionItemNames.length-1));
                    self.formData.jyxm = inspectionItemNames;


                    inspectionStandardstr = inspectionStandardstr.substring(0,(inspectionStandardstr.length-1));
                    self.formData.jyyj = inspectionStandardstr;
                    self.formData.jyfy=prices;
                    self.formData.limitDay = inspectionCycles;
                    self.formData.yjbxxjyxm = self.multipleSelectionOld;
                    self.formData = JSON.parse(JSON.stringify(self.formData))
                    self.insVisible=false;
                }else{
                    self.$message({message: '请选择检验项目！',type: 'warning'});
                    return ;
                }
            },
            openIns:function(){
                this.insVisible=true;
                this.pageForm.pageNumber = 1;
                this.pageForm.pageSize = 10;
                this.insDoSearch();
            },
            pageNumberChange: function (val) {//页码更新操作
                this.pageForm.pageNumber = val;
                this.insDoSearch();
            },
            pageSizeChange: function (val) {//分页大小更新操作
                this.pageForm.pageSize = val;
                this.insDoSearch();
            },
            doSearch: function () {
                this.pageForm.pageNumber = 1;
                this.insDoSearch();
            },
            insDoSearch:function(){
                var self = this;
                if(nONull(self.formData.yplx)){self.pageForm.yplx=self.formData.yplx.join(",");}
                sublime.showLoadingbar();//显示loading
                $.post(base + "/platform/bus/ypxx/jbxx/getInsData", self.pageForm, function (data) {
                    sublime.closeLoadingbar();//关闭loading
                    if (data.code == 0) {
                        //self.insTableData = self.insTableData.concat(data.data.list);
                        self.insTableData = data.data.list;
                        self.pageForm.totalCount = data.data.totalCount;
                        //已选择项带入
                        if (self.multipleSelectionOld.length > 0) {
                            self.$nextTick(function () {
                                self.multipleSelectionOld.forEach(function(item) {
                                    self.insTableData.forEach(function(listitem){
                                        if (item.insItemId == listitem.insItemId) {
                                            self.$refs.multipleTable.toggleRowSelection(listitem, true)
                                        }
                                    })
                                })
                            })
                        }
                    } else {
                        self.$message({
                            message: data.msg,
                            type: 'error'
                        });
                    }
                }, "json");
            },
            selectAll: function (val) {
                this.multipleSelection = val;
                var self = this;
                //self.multipleSelectionOld = self.multipleSelection;
                //塞入选择的项
                if(self.multipleSelection.length>0){
                    self.multipleSelection.forEach(function(itemNew){
                        var a = true;
                        self.multipleSelectionOld.forEach(function(itemOld) {
                            if (itemOld.insItemId == itemNew.insItemId) {
                                a=false;
                                return;
                            }
                        })
                        if(a){
                            self.multipleSelectionOld.push(itemNew);
                        }
                    })
                }else{
                    self.insTableData.forEach(function(itemTable){
                        self.multipleSelectionOld.forEach(function(itemOld2,i) {
                            if (itemOld2.insItemId == itemTable.insItemId) {
                                self.multipleSelectionOld.splice(i,1)
                                return;
                            }
                        })
                    })
                }
            },
            select: function (val,index) {
                this.multipleSelection = val;
                var self = this;
                //self.multipleSelectionOld = self.multipleSelection;
                //塞入选择的项
                var b = true ;
                self.multipleSelection.forEach(function(itemNew){
                    if (index.insItemId == itemNew.insItemId) {
                        var a = true;
                        self.multipleSelectionOld.forEach(function(itemOld) {
                            if (itemOld.insItemId == index.insItemId) {
                                a=false;
                                return;
                            }
                        })
                        if(a){
                            self.multipleSelectionOld.push(itemNew);
                        }
                        b = false ;
                        return;
                    }
                })
                if(b){
                    self.multipleSelectionOld.forEach(function(itemOld2,i) {
                        if (itemOld2.insItemId == index.insItemId) {
                            self.multipleSelectionOld.splice(i,1);
                            return;
                        }
                    })
                }

            },

            findZh: function(){
                var self = this;
                sublime.showLoadingbar();//显示loading
                $.post(base + "/platform/bus/ypxx/jbxx/findZh?zh=" + self.formData.zh+"&id="+self.formData.id, {}, function (data) {
                    sublime.closeLoadingbar();//关闭loading
                    if (data.code == 0) {
                        self.formData.ypbh = data.data;
                    } else {
                        self.$message({
                            message: data.msg,
                            type: 'error'
                        });
                    }
                }, "json");
            },
            doDraft: function (){
                var self = this;
                if(nONull(self.formData.jyksbh)){
                    self.formData.jyks = "";
                    for(var i =0 ;i<self.formData.jyksbh.length;i++){
                        self.formData.jyks += self.$refs['jyksCascader'].getCheckedNodes()[i].label;
                        if(i<(self.formData.jyksbh.length -1 )){
                            self.formData.jyks +=",";
                        }
                    }
                    self.formData.jyksbh=self.formData.jyksbh.join(",");
                }
                if(nONull(self.formData.zh)){self.formData.zh=self.formData.zh.join(",");}
                if(nONull(self.formData.yplx)){self.formData.yplx=self.formData.yplx.join(",");}
                if(nONull(self.formData.szcs)){self.formData.szcs=self.formData.szcs.join(",");}
                if(nONull(self.formData.yhxtk)){self.formData.yhxtk=self.formData.yhxtk.join(",");}
                if(nONull(self.formData.jylx)){self.formData.jylx=self.formData.jylx.join(",");}
                if(nONull(self.formData.information)){self.formData.information=self.formData.information.join(",");}
                if(nONull(self.formData.storage)){self.formData.storage=self.formData.storage.join(",");}
                if(nONull(self.formData.intention)){self.formData.intention=self.formData.intention.join(",");}
                if(nONull(self.formData.exterior)){self.formData.exterior=self.formData.exterior.join(",");}
                self.formData.yjbxxjyxm = JSON.stringify(self.multipleSelectionOld);
                //赋值流程状态 "草稿"
                self.formData.lczt="0";
                self.formData.lzzt="0";
                self.formData.status="";
                $.post(base + "/platform/bus/ypxx/jbxx/editDo", self.formData, function (data) {
                    if (data.code == 0) {
                        self.$message({
                            message: data.msg,
                            type: 'success'
                        });
                        window.location.href="/platform/bus/ypxx/jbxx";
                    } else {
                        if(nONull(self.formData.jyksbh)){self.formData.jyksbh=self.formData.jyksbh.split(",");}
                        if(nONull(self.formData.zh)){self.formData.zh=self.formData.zh.split(",");}
                        if(nONull(self.formData.yplx)){self.formData.yplx=self.formData.yplx.split(",");}
                        if(nONull(self.formData.szcs)){self.formData.szcs=self.formData.szcs.split(",");}
                        if(nONull(self.formData.yhxtk)){self.formData.yhxtk=self.formData.yhxtk.split(",");}
                        if(nONull(self.formData.jylx)){self.formData.jylx=self.formData.jylx.split(",");}
                        if(nONull(self.formData.information)){self.formData.information=self.formData.information.split(",");}
                        if(nONull(self.formData.storage)){self.formData.storage=self.formData.storage.split(",");}
                        if(nONull(self.formData.intention)){self.formData.intention=self.formData.intention.split(",");}
                        if(nONull(self.formData.exterior)){self.formData.exterior=self.formData.exterior.split(",");}
                        self.$message({
                            message: data.msg,
                            type: 'error'
                        });
                    }
                }, "json");
            },
            doAdd: function () {
                var self = this;
                self.$refs["addForm"].validate(function (valid) {
                    if (valid) {
                        if(nONull(self.formData.jyksbh)){
                            self.formData.jyks = "";
                            for(var i =0 ;i<self.formData.jyksbh.length;i++){
                                self.formData.jyks += self.$refs['jyksCascader'].getCheckedNodes()[i].label;
                                if(i<(self.formData.jyksbh.length -1 )){
                                    self.formData.jyks +=",";
                                }
                            }
                            self.formData.jyksbh=self.formData.jyksbh.join(",");
                        }
                        if(nONull(self.formData.zh)){self.formData.zh=self.formData.zh.join(",");}
                        if(nONull(self.formData.yplx)){self.formData.yplx=self.formData.yplx.join(",");}
                        if(nONull(self.formData.szcs)){self.formData.szcs=self.formData.szcs.join(",");}
                        if(nONull(self.formData.yhxtk)){self.formData.yhxtk=self.formData.yhxtk.join(",");}
                        if(nONull(self.formData.jylx)){self.formData.jylx=self.formData.jylx.join(",");}
                        if(nONull(self.formData.information)){self.formData.information=self.formData.information.join(",");}
                        if(nONull(self.formData.storage)){self.formData.storage=self.formData.storage.join(",");}
                        if(nONull(self.formData.intention)){self.formData.intention=self.formData.intention.join(",");}
                        if(nONull(self.formData.exterior)){self.formData.exterior=self.formData.exterior.join(",");}
                        self.formData.yjbxxjyxm = JSON.stringify(self.multipleSelectionOld);
                        //赋值流程状态 "提交"
                        self.formData.lczt="1";
                        self.formData.lzzt="0";
                        self.formData.status="";
                        $.post(base + "/platform/bus/ypxx/jbxx/editDo", self.formData, function (data) {
                            if (data.code == 0) {
                                self.$message({
                                    message: data.msg,
                                    type: 'success'
                                });
                                window.location.href="/platform/bus/ypxx/jbxx";
                            } else {
                                if(nONull(self.formData.jyksbh)){self.formData.jyksbh=self.formData.jyksbh.split(",");}
                                if(nONull(self.formData.zh)){self.formData.zh=self.formData.zh.split(",");}
                                if(nONull(self.formData.yplx)){self.formData.yplx=self.formData.yplx.split(",");}
                                if(nONull(self.formData.szcs)){self.formData.szcs=self.formData.szcs.split(",");}
                                if(nONull(self.formData.yhxtk)){self.formData.yhxtk=self.formData.yhxtk.split(",");}
                                if(nONull(self.formData.jylx)){self.formData.jylx=self.formData.jylx.split(",");}
                                if(nONull(self.formData.information)){self.formData.information=self.formData.information.split(",");}
                                if(nONull(self.formData.storage)){self.formData.storage=self.formData.storage.split(",");}
                                if(nONull(self.formData.intention)){self.formData.intention=self.formData.intention.split(",");}
                                if(nONull(self.formData.exterior)){self.formData.exterior=self.formData.exterior.split(",");}
                                self.$message({
                                    message: data.msg,
                                    type: 'error'
                                });
                            }
                        }, "json");
                    }
                });
            },
            companySearch(val, cb){
                var company = [];
                if(!nONull(val)){
                    cb(company)
                    return;
                }
                var searchForm ={
                    name:val
                }
                $.post(base + "/platform/bus/company/list", searchForm, function (data) {
                    if (data.code == 0) {
                        company= data.data;
                        //return company;
                        cb(company)
                    } else {
                        self.$message({
                            message: data.msg,
                            type: 'error'
                        });
                    }
                }, "json");
            },
            wtdwSelect(item){
                if(nONull(item)){
                    this.formData.wtdwId=item.id;
                    this.formData.wtdw=item.name;
                    this.formData.wtdwdz=item.address;
                    this.formData.wtdwlxr=item.contacts;
                    this.formData.wtdwsj=item.phone;
                    this.formData.wtdwdh=item.telephone;
                    this.formData.wtdwyb=item.postalCode;
                    this.formData = JSON.parse(JSON.stringify(this.formData))
                }
            },
            sjdwSelect(item){
                if(nONull(item)){
                    this.formData.sjdwId=item.id;
                    this.formData.sjdw=item.name;
                    this.formData.sjdwdz=item.address;
                    this.formData.sjdwlxr=item.contacts;
                    this.formData.sjdwsj=item.phone;
                    this.formData.sjdwdh=item.telephone;
                    this.formData.sjdwyb=item.postalCode;
                    this.formData = JSON.parse(JSON.stringify(this.formData))
                }
            },
            scdwSelect(item){
                if(nONull(item)){
                    this.formData.scdwId=item.id;
                    this.formData.scdw=item.name;
                    this.formData.scdwdz=item.address;
                    this.formData.scdwlxr=item.contacts;
                    this.formData.scdwsj=item.phone;
                    this.formData.scdwdh=item.telephone;
                    this.formData.scdwyb=item.postalCode;
                    this.formData = JSON.parse(JSON.stringify(this.formData))
                }
            },
            cydwSelect(item){
                if(nONull(item)){
                    this.formData.cydwId=item.id;
                    this.formData = JSON.parse(JSON.stringify(this.formData))
                }
            },

            sjdwToWtdw(){
                this.formData.sjdwId=this.formData.wtdwId;
                this.formData.sjdw=this.formData.wtdw;
                this.formData.sjdwdz=this.formData.wtdwdz;
                this.formData.sjdwlxr=this.formData.wtdwlxr;
                this.formData.sjdwsj=this.formData.wtdwsj;
                this.formData.sjdwdh=this.formData.wtdwdh;
                this.formData.sjdwyb=this.formData.wtdwyb;
                this.formData = JSON.parse(JSON.stringify(this.formData))
            },
            scdwToSjdw(){
                this.formData.scdwId=this.formData.sjdwId;
                this.formData.scdw=this.formData.sjdw;
                this.formData.scdwdz=this.formData.sjdwdz;
                this.formData.scdwlxr=this.formData.sjdwlxr;
                this.formData.scdwsj=this.formData.sjdwsj;
                this.formData.scdwdh=this.formData.sjdwdh;
                this.formData.scdwyb=this.formData.sjdwyb;
                this.formData = JSON.parse(JSON.stringify(this.formData))
            },
            getDict: function (val, map) {
                if (val != null && val != undefined && val != "" && map != null && map != undefined) {
                    var str = val.split(",");
                    var strname = "";
                    for (var a = 0; a < str.length; a++) {
                        strname += map[str[a]];
                        if (strname == null) {

                        }
                        if (a < (str.length - 1)) {
                            strname += "/";
                        }
                    }
                    return strname;
                }
                return "";
            }
        },
        created: function () {
            //页面加载完成后给el-cascader组件赋值，需要数组
            var self = this;
            if(nONull(self.formData.jyksbh)){self.formData.jyksbh=self.formData.jyksbh.split(",");}
            if(nONull(self.formData.zh)){self.formData.zh=self.formData.zh.split(",");}
            if(nONull(self.formData.yplx)){self.formData.yplx=self.formData.yplx.split(",");}
            if(nONull(self.formData.szcs)){self.formData.szcs=self.formData.szcs.split(",");}
            if(nONull(self.formData.yhxtk)){self.formData.yhxtk=self.formData.yhxtk.split(",");}
            if(nONull(self.formData.jylx)){self.formData.jylx=self.formData.jylx.split(",");}
            if(nONull(self.formData.information)){self.formData.information=self.formData.information.split(",");}
            if(nONull(self.formData.storage)){self.formData.storage=self.formData.storage.split(",");}
            if(nONull(self.formData.intention)){self.formData.intention=self.formData.intention.split(",");}
            if(nONull(self.formData.exterior)){self.formData.exterior=self.formData.exterior.split(",");}

            self.formData = JSON.parse(JSON.stringify(self.formData))
            self.multipleSelectionOld=self.formData.yjbxxjyxm;
        }
    });
    function nONull(val){
        if (val!= null && val!=undefined &&val!="" &&val!="null" &&val!="undefined" ){
            return true;
        }else{
            return false;
        }
    }
</script>
<!--#
}
#-->
